<?php
class clientModel{
	private $id,$nom,$prenom,$adresse,$cp,$ville,$tel,$mail;
	
	public function getId()
	{
		return $this->id;
	}
	
	public function getNom()
	{
		return $this->nom;
	}

	public function getPrenom()
	{
		return $this->prenom;
	}
	
	public function getAdresse()
	{
		return $this->adresse;
	}
	
	public function getCP()
	{
		return $this->cp;
	}
	
	public function getVille()
	{
		return $this->ville;
	}
	
	public function getTel()
	{
		return $this->tel;
	}
	
	public function getMail()
	{
		return $this->mail;
	}
	
	public function setId($value)
	{
		$this->id = $value;
	}
	
	public function setNom($value)
	{
		$this->nom = $value;
	}
	
	public function setPrenom($value)
	{
		$this->prenom = $value;
	}
	
    public function setAdresse($value)
	{
		$this->adresse = $value;
	}
	
    public function setCP($value)
	{
		$this->cp = $value;
	}
	
    public function setVille($value)
	{
		$this->ville = $value;
	}
	
	public function setTel($value)
	{
		$this->tel = $value;
	}
	
	public function setMail($value)
	{
		$this->mail = $value;
	}
	
	public function getClientIdAndName()
	{
		$sql = "SELECT idClient,nom FROM client";
		$req = mysql_query($sql);
		$i = 0;
		while($row = mysql_fetch_array($req))
		{
			$tab_client[$i]["id_client"] = $row["idClient"];
			$tab_client[$i]["nom_client"] = $row["nom"];
			$i++;
		}
		
		return $tab_client;
	}
}